#!/bin/bash
# Start all server services
echo "Starting all server services..."

# Start each server in the background
nohup java -jar gate-server/target/gate-server-1.0.0.jar --spring.profiles.active=dev > logs/gate-server.log 2>&1 &
nohup java -jar scene-server/target/scene-server-1.0.0.jar --spring.profiles.active=dev > logs/scene-server.log 2>&1 &
nohup java -jar login-server/target/login-server-1.0.0.jar --spring.profiles.active=dev > logs/login-server.log 2>&1 &
nohup java -jar central-server/target/central-server-1.0.0.jar --spring.profiles.active=dev > logs/central-server.log 2>&1 &
nohup java -jar balance-server/target/balance-server-1.0.0.jar --spring.profiles.active=dev > logs/balance-server.log 2>&1 &

echo "All servers have been started. Use the following command to check status:"
echo "ps -ef | grep java"